home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 4 Database How-To
/
Visual Basic 4 Database - How-to (The Waite Group)(1995).iso
/
client.fr_
/
client.fr
Wrap
Text File
|
1995-07-05
|
8KB
|
286 lines
VERSION 4.00
Begin VB.Form Form1
BackColor = &H00C0C0C0&
Caption = "BIBLIO Client"
ClientHeight = 6060
ClientLeft = 510
ClientTop = 945
ClientWidth = 7815
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 6465
Left = 450
LinkTopic = "Form1"
ScaleHeight = 6060
ScaleWidth = 7815
Top = 600
Width = 7935
Begin VB.CommandButton cmdClose
Caption = "&Close"
Height = 495
Left = 4380
TabIndex = 17
Top = 1260
Width = 2535
End
Begin VB.CommandButton cmdShowTitles
Caption = "&Show Titles"
Height = 495
Left = 4380
TabIndex = 16
Top = 540
Width = 2535
End
Begin VB.ListBox lstTitles
Height = 1005
Left = 420
Sorted = -1 'True
TabIndex = 2
Top = 2400
Width = 7155
End
Begin VB.ListBox lstAuthors
Height = 1395
Left = 420
Sorted = -1 'True
TabIndex = 0
Top = 540
Width = 3375
End
Begin VB.Label lblComments
BackColor = &H00C0C0C0&
Height = 1335
Left = 1560
TabIndex = 15
Top = 4560
Width = 6015
WordWrap = -1 'True
End
Begin VB.Label lblNotes
BackColor = &H00C0C0C0&
Height = 195
Left = 1560
TabIndex = 14
Top = 4320
Width = 6015
End
Begin VB.Label lblDescription
BackColor = &H00C0C0C0&
Height = 195
Left = 1560
TabIndex = 13
Top = 4080
Width = 6015
End
Begin VB.Label lblSubject
BackColor = &H00C0C0C0&
Height = 195
Left = 1560
TabIndex = 12
Top = 3840
Width = 6015
End
Begin VB.Label lblYear
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Height = 195
Left = 6960
TabIndex = 11
Top = 3600
Width = 615
End
Begin VB.Label lblPublisher
BackColor = &H00C0C0C0&
Height = 195
Left = 1560
TabIndex = 10
Top = 3600
Width = 3795
End
Begin VB.Label Label8
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Comments:"
Height = 195
Left = 420
TabIndex = 9
Top = 4560
Width = 930
End
Begin VB.Label Label7
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Notes:"
Height = 195
Left = 420
TabIndex = 8
Top = 4320
Width = 570
End
Begin VB.Label Label6
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Description:"
Height = 195
Left = 420
TabIndex = 7
Top = 4080
Width = 1035
End
Begin VB.Label Label5
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Subject:"
Height = 195
Left = 420
TabIndex = 6
Top = 3840
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Year Pub:"
Height = 195
Left = 5880
TabIndex = 5
Top = 3600
Width = 855
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Publisher:"
Height = 195
Left = 420
TabIndex = 4
Top = 3600
Width = 855
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Titles:"
Height = 195
Left = 420
TabIndex = 3
Top = 2160
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Authors:"
Height = 195
Left = 420
TabIndex = 1
Top = 240
Width = 720
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private AuthorList As Object
Private Const APP_NAME = "BIBLIO Client"
Private Sub cmdShowTitles_Click()
Dim au As Object
Dim ti As Object
Dim n As Integer
On Error GoTo ShowTitlesError
If lstAuthors.ListIndex > -1 Then
Screen.MousePointer = 11
lstTitles.Clear
lblPublisher.Caption = ""
lblYear.Caption = ""
lblSubject.Caption = ""
lblDescription.Caption = ""
lblNotes.Caption = ""
lblComments.Caption = ""
Set au = AuthorList.Item(lstAuthors.ItemData(lstAuthors.ListIndex))
If au.ReadTitles(BiblioPath()) > 0 Then
n = 1
For Each ti In au.Titles
lstTitles.AddItem ti.Title
lstTitles.ItemData(lstTitles.NewIndex) = n
n = n + 1
Next
Else
MsgBox "No titles for this author", vbExclamation, APP_NAME
End If
Else
MsgBox "You have not selected a title", vbExclamation, APP_NAME
End If
Screen.MousePointer = 0
Exit Sub
ShowTitlesError:
Screen.MousePointer = 0
MsgBox Err.Description & " (" & Err.Number & ")", vbExclamation, APP_NAME
Exit Sub
End Sub
Private Sub Form_Load()
On Error GoTo LoadError
Me.Show
Me.Refresh
Screen.MousePointer = 11
Set AuthorList = CreateObject("DServer.clsAuthors")
AuthorList.DatabaseName = BiblioPath() ' BiblioPath is a function in READINI.BAS
AuthorList.FillCollection Append:=False
AuthorList.FillList lstAuthors
Screen.MousePointer = 0
Exit Sub
LoadError:
Screen.MousePointer = 0
MsgBox Err.Description & " (" & Err.Number & ")", vbCritical, APP_NAME
End
End Sub
Private Sub lstAuthors_DblClick()
cmdShowTitles_Click
End Sub
Private Sub lstTitles_Click()
Dim ti As Object
On Error GoTo TitleDetailsError
Screen.MousePointer = 11
Set ti = AuthorList.Item(lstAuthors.ItemData(lstAuthors.ListIndex)).Titles.Item(lstTitles.ItemData(lstTitles.ListIndex))
lblPublisher.Caption = ti.PublisherName
lblYear.Caption = CStr(ti.YearPublished)
lblSubject.Caption = ti.Subject
lblDescription.Caption = ti.Description
lblNotes.Caption = ti.Notes
lblComments.Caption = ti.Comments
Screen.MousePointer = 0
Exit Sub
TitleDetailsError:
Screen.MousePointer = 0
MsgBox Err.Description & " (" & Err.Number & ")", vbExclamation, APP_NAME
Exit Sub
End Sub
Private Sub cmdClose_Click()
End
End Sub